package design_1_factory.demo3.factory;

import design_1_factory.demo3.server.QQAService;
import design_1_factory.demo3.server.QQBService;
import design_1_factory.demo3.server.QQCService;
import design_1_factory.demo3.server.impl.A1ServiceImpl;
import design_1_factory.demo3.server.impl.A2ServiceImpl;
import design_1_factory.demo3.server.impl.A3ServiceImpl;

/**
 * 创建一个抽象工厂
 *
 * @author wangsong
 * @email 1720696548@qq.com
 * @date 2022/1/18 11:35
 */
public class AFactory extends QQAbstractFactory {

	@Override
	public QQAService background(String background) {
		if(background.equals("A1")){
			return new A1ServiceImpl();
		}else if(background.equals("A2")){
			return new A2ServiceImpl();
		}else if(background.equals("A3")){
			return new A3ServiceImpl();
		}
		return null;
	}

	@Override
	public QQBService border(String shape) {
		return null;
	}

	@Override
	public QQCService typeface(String shape) {
		return null;
	}
}